<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>embedme: MemShared类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.8 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="class_mem_shared-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">MemShared类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>共享内存类  
 <a href="class_mem_shared.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_mem_shared_8h_source.html">MemShared.h</a>&gt;</code></p>
<div class="dynheader">
类 MemShared 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_mem_shared.png" usemap="#MemShared_map" alt=""/>
  <map id="MemShared_map" name="MemShared_map">
<area href="class_i_o_device.html" title="IO设备抽象类 " alt="IODevice" shape="rect" coords="0,0,80,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a06ca87b7be34fedebb386510110ec1fb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a06ca87b7be34fedebb386510110ec1fb"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>MemShared</b> (sint32 type)</td></tr>
<tr class="separator:a06ca87b7be34fedebb386510110ec1fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39df58e72b12e412fb8474bf5d8173e5"><td class="memItemLeft" align="right" valign="top">virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_mem_shared.html#a39df58e72b12e412fb8474bf5d8173e5">open</a> (const char *name=NULL, sint32 ioMode=IO_MODE_INVALID)</td></tr>
<tr class="memdesc:a39df58e72b12e412fb8474bf5d8173e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">打开设备  <a href="#a39df58e72b12e412fb8474bf5d8173e5">更多...</a><br /></td></tr>
<tr class="separator:a39df58e72b12e412fb8474bf5d8173e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62a6cdc1ea9b5507139139fce086e84d"><td class="memItemLeft" align="right" valign="top">virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_mem_shared.html#a62a6cdc1ea9b5507139139fce086e84d">close</a> ()</td></tr>
<tr class="memdesc:a62a6cdc1ea9b5507139139fce086e84d"><td class="mdescLeft">&#160;</td><td class="mdescRight">关闭设备  <a href="#a62a6cdc1ea9b5507139139fce086e84d">更多...</a><br /></td></tr>
<tr class="separator:a62a6cdc1ea9b5507139139fce086e84d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24e32fa286382d21e12ef622ea5a367f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a24e32fa286382d21e12ef622ea5a367f"></a>
virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><b>readData</b> (char *buf, sint32 count, sint32 timeoutMs=-1)</td></tr>
<tr class="separator:a24e32fa286382d21e12ef622ea5a367f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad36a54f833477a0d2c1e1a98fe20edd3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad36a54f833477a0d2c1e1a98fe20edd3"></a>
virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><b>writeData</b> (const char *buf, sint32 count, sint32 timeoutMs=-1)</td></tr>
<tr class="separator:ad36a54f833477a0d2c1e1a98fe20edd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a1bfc1f7a6e018b0e2914edc3abb54d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a1bfc1f7a6e018b0e2914edc3abb54d"></a>
virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><b>setAttribute</b> (sint32 attr, sint32 value)</td></tr>
<tr class="separator:a9a1bfc1f7a6e018b0e2914edc3abb54d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0760e878cf3ec71cf268828ec38dc66e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0760e878cf3ec71cf268828ec38dc66e"></a>
virtual sint32&#160;</td><td class="memItemRight" valign="bottom"><b>getAttribute</b> (sint32 attr)</td></tr>
<tr class="separator:a0760e878cf3ec71cf268828ec38dc66e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad48f6b4ba4901887f92567b6c51f86ea"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad48f6b4ba4901887f92567b6c51f86ea"></a>
void *&#160;</td><td class="memItemRight" valign="bottom"><b>getMemAddr</b> ()</td></tr>
<tr class="separator:ad48f6b4ba4901887f92567b6c51f86ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac68524a36e11ba51427c743e59cbb785"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_mem_shared.html#ac68524a36e11ba51427c743e59cbb785">attach</a> ()</td></tr>
<tr class="memdesc:ac68524a36e11ba51427c743e59cbb785"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建并绑定共享内存  <a href="#ac68524a36e11ba51427c743e59cbb785">更多...</a><br /></td></tr>
<tr class="separator:ac68524a36e11ba51427c743e59cbb785"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08e6309ca41938d42aad149d7f8918e1"><td class="memItemLeft" align="right" valign="top">sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_mem_shared.html#a08e6309ca41938d42aad149d7f8918e1">detach</a> ()</td></tr>
<tr class="memdesc:a08e6309ca41938d42aad149d7f8918e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">销毁共享内存区域  <a href="#a08e6309ca41938d42aad149d7f8918e1">更多...</a><br /></td></tr>
<tr class="separator:a08e6309ca41938d42aad149d7f8918e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
额外继承的成员函数</h2></td></tr>
<tr class="inherit_header pro_attribs_class_i_o_device"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_class_i_o_device')"><img src="closed.png" alt="-"/>&#160;Protected 属性 继承自 <a class="el" href="class_i_o_device.html">IODevice</a></td></tr>
<tr class="memitem:a5ab8e2aa83ad8a53d8ddbb19b23d3688 inherit pro_attribs_class_i_o_device"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5ab8e2aa83ad8a53d8ddbb19b23d3688"></a>
sint32&#160;</td><td class="memItemRight" valign="bottom"><b>m_fd</b></td></tr>
<tr class="separator:a5ab8e2aa83ad8a53d8ddbb19b23d3688 inherit pro_attribs_class_i_o_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4900690afb4b4d17f90cfe3a9fb504e inherit pro_attribs_class_i_o_device"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa4900690afb4b4d17f90cfe3a9fb504e"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>m_devName</b></td></tr>
<tr class="separator:aa4900690afb4b4d17f90cfe3a9fb504e inherit pro_attribs_class_i_o_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e930bf51c6a266e5be5b2ed62c7ecfa inherit pro_attribs_class_i_o_device"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5e930bf51c6a266e5be5b2ed62c7ecfa"></a>
sint32&#160;</td><td class="memItemRight" valign="bottom"><b>m_openMode</b></td></tr>
<tr class="separator:a5e930bf51c6a266e5be5b2ed62c7ecfa inherit pro_attribs_class_i_o_device"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>共享内存类 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="ac68524a36e11ba51427c743e59cbb785"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void * MemShared::attach </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>创建并绑定共享内存 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回内存地址,失败返回NULL </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a62a6cdc1ea9b5507139139fce086e84d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sint32 MemShared::close </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>关闭设备 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">void</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>设备关闭成功返回STATUS_OK,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

<p>重载 <a class="el" href="class_i_o_device.html#a1120c9e7a7c4d0b23083effbe4cb6279">IODevice</a> .</p>

</div>
</div>
<a class="anchor" id="a08e6309ca41938d42aad149d7f8918e1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sint32 MemShared::detach </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>销毁共享内存区域 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回STATUS_OK,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a39df58e72b12e412fb8474bf5d8173e5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sint32 MemShared::open </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>devName</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">sint32&#160;</td>
          <td class="paramname"><em>mode</em> = <code>IO_MODE_INVALID</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>打开设备 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">devName</td><td>设备全名(包含路径,如:/dev/ttyS0) </td></tr>
    <tr><td class="paramname">mode</td><td>打开模式IO_MODE_E </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>设备打开成功返回STATUS_OK,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

<p>重载 <a class="el" href="class_i_o_device.html#a426aac91300f077d57b1f30c76c7c430">IODevice</a> .</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>libemb/inc/<a class="el" href="_mem_shared_8h_source.html">MemShared.h</a></li>
<li>libemb/src/MemShared.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2016年 七月 7日 星期四 19:49:39 , 为 embedme使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
